CC = gcc
SRC_S = rocket-s.c
SRC_P = rocket-p.c
EXE_S = rc_s
EXE_P = rc_p
INPUT1 = input1.in
INPUT2 = input2.in
INPUT3 = input3.in
INPUT4 = input4.in

all:
	$(CC) $(SRC_S) -lm -o $(EXE_S)
	$(CC) -pthread $(SRC_P) -lm -o $(EXE_P)

s1:
	./$(EXE_S) < $(INPUT1)
s2:
	./$(EXE_S) < $(INPUT2)
s3:
	./$(EXE_S) < $(INPUT3)
s4:
	./$(EXE_S) < $(INPUT4)

p1:
	./$(EXE_P) < $(INPUT1)
p2:
	./$(EXE_P) < $(INPUT2)
p3:
	./$(EXE_P) < $(INPUT3)
p4:
	./$(EXE_P) < $(INPUT4)
